XIQS Create Device

From IQsimWiki

Jump to: navigation, search

XIQS Create Device - GSM Device Management

Description
Until API 1.4.0

createXIQSDevice ( String device_name , String ip_address , String login , String password , Long country [, Long id_partition ] )

Create a new device, initialized with name, IP and country code.


Since API 1.5.0

createXIQSDevice ( [ Long id_partition , ] String param=value , ... )

Create a new device, initialized with a list of variable parameters in the form [ param_name=param_value ]. The "param_name" should match names defined in the getXIQSDeviceList  command.
The id_partition parameter is mandatory when current user is administrator.
Parameters

String device_name

Device name

String ip_address

Device IP Address

String login

Username

String password

User password

Long country

Country code. The country code references to the international phone country code ( i .e. France = 33 , Germany = 49 , etc. )

[ Long id_partition ]

Partition Id
Return Values
Long id_device
Device Id


Error Data structure ( Error Management )

Possible failure code returns
*ERR_OBJECT_EXISTS(451) ERR_MSG_DVC_FOUND
*ERR_SRV_INTERNAL (500) ERR_MSG_NO_DB or ERR_MSG_OBJ_NO_ID
See Also

getXIQSDeviceList
updateXIQSDevice
deleteXIQSDevice
getXIQSDevicePortMap
getXIQSDeviceMapList
mapXIQSDevice
unmapXIQSDevice
getXIQSIPConfig
updateXIQSIPConfig
rebootXIQSMachine

Example

[REQUEST UNTIL API 1.4.0]
<?xml version="1.0" encoding="UTF-8"?>
<command tid=0001" name="createXIQSDevice">
  <param type="string">testGW</param>
  <param type="string">192.168.1.21</param>
  <param type="string">name</param>
  <param type="string">password</param>
  <param type="long">412</param>
  <param type="long">2</param>
</command>
[REQUEST SINCE API 1.50]
<?xml version="1.0" encoding="UTF-8"?>
<command tid="0001" name="createXIQSDevice">
  <param type="string">name='testGW'</param>
  <param type="string">ip='192.168.1.21'</param>
  <param type="string">login='myname'</param>
  <param type="string">password='mypassword'</param>
  <param type="string">country=412</param>
</command>

[ANSWER (OK)]
<?xml version="1.0" encoding="UTF-8"?>
<event type="return" tid="0001">
  <meta-data>
    <meta-value><name>id</name><pos>1</pos>
</meta-value>
  </meta-data>
  <param type="long">1</param>
</event>

[ANSWER (Error)]
<?xml version="1.0" encoding="UTF-8"?>
<event type="error">
  <meta-data>
    <meta-value><name>err_code</name><pos>1</pos></meta-value>
    <meta-value><name>err_desc</name><pos>2</pos></meta-value>
  </meta-data>
  <param type="integer">451</param>
  <param type="string">err.device.name.exist(testGW)</param>
</event>

Personal tools
Namespaces
Variants
Views
Actions
Navigation
XIQS XML Protocol
XIQS Framework Libraries
XIQS Command List